﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;

namespace RBS.Common.Api
{
    partial class Request
    {
        public  static string GetResponse(string url)
        {
            string req = "";
            WebRequest request = WebRequest.Create(url);
            using (WebResponse response = request.GetResponse())
            // ReSharper disable AssignNullToNotNullAttribute
            using (var stream = new StreamReader(stream: response.GetResponseStream()))
            // ReSharper restore AssignNullToNotNullAttribute
            {
                req = stream.ReadToEnd();
            }
            return req;
        }

    }
}
